package com.kot.backend.controller.pk;

import com.kot.backend.mapper.UserMapper;
import com.kot.backend.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {
        @Autowired//自动装配
        UserMapper userMapper;

        @RequestMapping("/user/all/")
        public List<User> getAll(){
            return userMapper.selectList(null);//传空表示差所有
        }


}
